-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][admin] Fix exception thrown in getMessageId method #23784
Conversation
@danpi The result of a CompletableFuture doesn't change after it has been set once with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change isn't strictly needed since CompleteFuture state doesn't change after completion. A second call to completeExceptionally will be a no-op. However, this code change is fine.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23784 +/- ##
============================================
+ Coverage 73.57% 73.91% +0.33%
+ Complexity 32624 31813 -811
============================================
Files 1877 1853 -24
Lines 139502 146748 +7246
Branches 15299 17184 +1885
============================================
+ Hits 102638 108468 +5830
- Misses 28908 29672 +764
- Partials 7956 8608 +652
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: houbonan <[email protected]> (cherry picked from commit 1f7a79f)
Co-authored-by: houbonan <[email protected]> (cherry picked from commit 1f7a79f)
Co-authored-by: houbonan <[email protected]> (cherry picked from commit 1f7a79f)
Co-authored-by: houbonan <[email protected]> (cherry picked from commit 1f7a79f) (cherry picked from commit b738d14)
Co-authored-by: houbonan <[email protected]> (cherry picked from commit 1f7a79f) (cherry picked from commit b738d14)
Fixes #23766
Motivation
During the fix of the previous issue, a detail was overlooked, which could lead to the exception being overwritten.
Modifications
Add a return statement after handling the LedgerNotExistException in the readEntryFailed method to ensure that the exception is not overwritten by subsequent code.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: